<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">

        <?
            $urlarray = explode("/", $_SERVER['REQUEST_URI']);
            $end = $urlarray[count($urlarray) - 1];
            if ($end == "")
                $end = 'index';

            $CUR = 'class="current"';

            switch ($end) {
                case 'index':
                case 'en':
                case 'me':
                    $title = lang('welcome');
                    break;
                case 'znanja': $title = lang('n.znanja');
                    break;
                case 'zeolit': $title = lang('n.zeolit');
                    break;
                case 'napici': $title = lang('n.napici');
                    break;
                case 'tajne': $title = lang('n.tajne');
                    break;
                case 'gorski_kristal': $title = lang('n.gorski_kristal');
                    break;
                case 'analize_saveti': $title = lang('n.analize_saveti');
                    break;
                case 'ociscenje': $title = lang('n.ociscenje');
                    break;
                case 'harmonizacija': $title = lang('n.harmonizacija');
                    break;
                case 'porodicna_stabla': $title = lang('n.porodicna_stabla');
                    break;
                case 'amuleti': $title = lang('n.amuleti');
                    break;
                case 'kontakt': $title = 'Predrag Jevtić | Olivera Kukić';
                    break;

                default : $title = lang('welcome');
            }
        ?>

        <title><?= lang('main_title'); ?> | <?= $title; ?></title>
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>assets/css/style.css">
        <link rel="shortcut icon" href="<?= base_url() ?>assets/img/favicon.ico">

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-40884586-1']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script');
                ga.type = 'text/javascript';
                ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(ga, s);
            })();

        </script>
    </head>
    <body>

        <div id="page">

            <ul id="langs" class="clearfix">

                <li><a href="<?=base_url(lchange('me'))?>" class="me"></a></li>
                <li><a href="<?=base_url(lchange('en'))?>" class="en"></a></li>

            </ul>

            <div id="header">

                <a href="<?= lang_url() ?>" id="logo"><img src="<?= base_url() ?>assets/img/logo.jpg" alt="Apolonska svetlosna paralelna znanja"></a>
                <ul class="clearfix">
                    <li <? if ($end == 'index' || $end == 'en' || $end == 'me') echo $CUR; ?>>
                        <a href="<?= lang_url('home') ?>">Home</a>
                    </li>
                    <li <? if ($end == 'znanja') echo $CUR; ?>>
                        <a href="<?= lang_url('znanja') ?>"><?= lang('n.znanja'); ?></a>
                    </li>
                    <li <? if ($end == 'zeolit' || $end == 'napici' || $end == 'tajne' || $end == 'gorski_kristal') echo $CUR; ?>>
                        <a href="<?= lang_url('zeolit') ?>"><?= lang('n.proizvodi'); ?></a>
                        <ul>
                            <li>
                                <a href="<?= lang_url('zeolit') ?>"><?= lang('n.zeolit'); ?></a>
                                <a href="<?= lang_url('napici') ?>"><?= lang('n.napici'); ?></a>
                                <a href="<?= lang_url('tajne') ?>"><?= lang('n.tajne'); ?></a>
                                <a href="<?= lang_url('gorski_kristal') ?>"><?= lang('n.gorski_kristal'); ?></a>
                            </li>
                        </ul>
                    </li>
                    <li <? if ($end == 'analize_saveti' || $end == 'ociscenje' || $end == 'harmonizacija' || $end == 'porodicna_stabla' || $end == 'amuleti') echo $CUR; ?>>
                        <a href="<?= lang_url('analize_saveti') ?>"><?= lang('n.usluge'); ?></a>
                        <ul>
                            <li>
                                <a href="<?= lang_url('analize_saveti') ?>"><?= lang('n.analize_saveti'); ?></a>
                                <a href="<?= lang_url('ociscenje') ?>"><?= lang('n.ociscenje'); ?></a>
                                <a href="<?= lang_url('harmonizacija') ?>"><?= lang('n.harmonizacija'); ?></a>
                                <a href="<?= lang_url('porodicna_stabla') ?>"><?= lang('n.porodicna_stabla'); ?></a>
                                <a href="<?= lang_url('amuleti') ?>"><?= lang('n.amuleti'); ?></a>
                            </li>
                        </ul>
                    </li>
                    <li <? if ($end == 'kontakt') echo $CUR; ?>>
                        <a href="<?= lang_url('kontakt') ?>"><?= lang('n.contact'); ?></a>
                    </li>
                </ul>
            </div>

            <?= $contents ?>

            <div id="footer">
                <div>
                    <div>
                        <img src="<?= base_url() ?>assets/img/apolon_small.png" />

                        <span class="citati">

                            <?= lang('citati'); ?>

                        </span>

                    </div>

                    <div>
                        <h1>Connect</h1>
                        <a href="mailto:info@apollosvetlosnaparalelnaznanja.com" target="_blank" id="mail">Email us</a>
                        <a href="http://www.facebook.com" target="_blank" id="facebook">Facebook</a>
                        <a href="http://www.twitter.com" target="_blank" id="twitter">Twitter</a>
                    </div>
                </div>
                <p>
                    <?= lang('main_title'); ?> &copy; 2013  | <?= lang('copy'); ?>
                </p>
            </div>
        </div>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
        <script src="<?= base_url() ?>assets/js/libs/jquery.validate.js" ></script>
        <script src="<?= base_url() ?>assets/js/main.js" ></script>

    </body>
</html>